<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ taglib prefix="s" uri="http://stripes.sourceforge.net/stripes.tld" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>

<s:layout-definition>
    <DOCTYPE html>
        <html lang=${pageContext.request.locale}> 
            <head>
                <title><f:message key="${titlekey}"/></title>

                <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/style.css" />
                <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
                <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
                <script src="${pageContext.request.contextPath}/js/messages.js"></script>
                <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
                <script src="${pageContext.request.contextPath}/js/jquery-ui-timepicker-addon.js"></script>
                <script type="text/javascript">
                    $(function() {
                        $('#timepicker').timepicker()
                    });
                </script>

                <s:layout-component name="header"/>
            </head>
            <body>
                <a name="top"/>
                <div class="wrapper">
                    <div class="layout-header">
                        <div class="logo">
                            <a href="${pageContext.request.contextPath}">
                                <img src="${pageContext.request.contextPath}/image/logo.png" alt="logo"/></a>
                        </div>
                        <div class="heading">
                            <h1>
                                <f:message key="app.header.title"/> 

                                <sec:authentication property="authorities" var="rr" scope="page"/>               
                                <c:if test="${rr} == ROLE_ADMIN">
                                    <strong><f:message key="app.header.administrartion"/></strong>
                                </c:if>

                            </h1>
                            <span class="credo"><f:message key="app.header.credo"/></span>
                        </div>
                        <div class="sign-details"></div>                  
                        <div class="sign-details">User: <sec:authentication property="name"/></div>
                        <div class="sign-details"><a id="signin" href="${pageContext.request.contextPath}/j_spring_security_logout"><f:message key="navigation.logout" /></a></div>



                        <div class="content">
                            <s:layout-component name="body"/>
                        </div>
                    </div>
            </body>
        </html>
    </s:layout-definition>